#ifndef CMD_H_
#define CMD_H_
#define TIMECHAZHI 426551686

#define BEAT			0x1000 //心跳测试
#define CONFIG_WIFI     0x1001

#define USR_LOGIN		0xa000
#define USR_REG			0xa001
#define USR_BIND_DEV	0xa002
#define USR_UNBIND_DEV	0xa003
#define USR_MODIFY_PSWD		0xa004

#define ADMIN_DEV_ADD 0xa010
#define ADMIN_DEV_DELETE 0xa011
#define ADMIN_USR_DELETE 0xa012
#define ADMIN_USR_ADD 0xa013

#define SET_DEV_PSWD		0x2001
#define SET_DEV_POLL_FREQ	0x2002

#define SET_ON_DO10		0x2003
#define SET_ON_DO16		0x2004
#define SET_ON_DO20		0x2005
#define SET_ON_DO00		0x2006
#define SET_ON_DO01		0x2007
#define SET_ON_DO06		0x2008
#define SET_ON_DO07		0x2009

#define SET_OFF_DO10	0x200a
#define SET_OFF_DO16	0x200b
#define SET_OFF_DO20	0x200c
#define SET_OFF_DO00	0x200d
#define SET_OFF_DO01	0x200e
#define SET_OFF_DO06	0x200f
#define SET_OFF_DO07	0x2010

#define SET_ON_RELAY	SET_ON_DO10
#define SET_OFF_RELAY	SET_OFF_DO10


#define FORCE_DEV_OFFLINE		0x3000
#define CX_DEV_ISONLINE			0x3001
#define UP_DEV_ISONLINE_ON	    0x3002
#define UP_DEV_ISONLINE_OFF	    0x3003


#define CX_ALL_VALUE	0x3004
#define UP_ALL_VALUE	0x3005
#define UP_ALL_VALUE_FROM_FLASH	0x3006

#define EMIT_IRCODE		0x3007
#define UP_IRCODE		0x3008


//状态值
#define STATUS_OFF              0x00
#define STATUS_ON               0x01

//响应值
#define SMT_SUCCESS		0x00 //设置成功
#define SMT_FAILED		0x01 //设置失败
#define SMT_DEV_OFFLINE		0x02


#define USR_INVALIDE		0x11
#define PSWD_INVALIDE		0x12

#define USR_BIND_DEV_INVALID_DEV		0x21
#define USR_BIND_DEV_ALREADY_BIND		0x22


#endif


